<?php
/* @var $this ProyectoController */
/* @var $model Proyecto */

$this->breadcrumbs=array(
	'Project'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>'List Project', 'url'=>array('index')),
	array('label'=>'Create Project', 'url'=>array('create')),
	array('label'=>'Update Project', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Project', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Project', 'url'=>array('admin')),
);

$this->menu2=array(
	   
        array('label'=>'Create Experiment', 'url'=>array('experimento/create','pid'=>$model->id)),
        array('label'=>'Add Researcher', 'url'=>array('proyecto/adduser','id'=>$model->id)),
);
?>

<h1>View Proyect <?php echo $model->nombre; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		array(
                    'name'=>'idCoordinador',
                    'value'=>CHtml::encode($model->getUserText())
                ),
		'nombre',
		'objetivo',
		array(
                    'name'=>'finalizado',
                    'value'=>CHtml::encode($model->getFinalizadoText())
                ),
	),
)); ?>

<br />

<h1>Researcher</h1> 

<?php foreach($model->getUserProjects("investigador") as $txt): ?>
    <div class="author">
        <li><?php echo CHtml::encode($txt); ?></li>
    </div>
<?php endforeach; ?>
<br />
<br />

<h1>Experiments</h1> 

<?php $this->widget('zii.widgets.CListView', array('dataProvider'=>$experimentoDataProvider,'itemView'=>'/experimento/_view',)); ?>
